import axios from "@/common/axios";
import { API_URL } from "@/common/constants";

export const queryEmergContactList = async (json) => {
  let { data } = await axios.post(API_URL + "rEmergContactApi/queryEmergContactList", json);
  return data;
};



export const updateEmergContact = async (json) => {
  let { data } = await axios.post(API_URL + "rEmergContactApi/updateEmergContact", json);
  return data;
};


export const addEmergContact = async (json) => {
  let { data } = await axios.post(API_URL + "rEmergContactApi/addEmergContact", json);
  return data;
};



export const delEmergContact = async (json) => {
  let { data } = await axios.post(API_URL + "rEmergContactApi/delEmergContact", json);
  return data;
};


export const importExcel = async (formData) => {
  let { data } = await axios.post(API_URL + "rEmergContactApi/importExcel", formData, {
    headers: {
      'Content-Type': 'multipart/form-data;charset=utf-8'
    }
  });
  return data;

}


export const uploadFile = async (formData) => {
  let { data } = await axios.post(API_URL + "rEmergContactApi/uploadFile", formData, {
    headers: {
      'Content-Type': 'multipart/form-data;charset=utf-8'
    }
  });
  return data;

}